Fix Inno Setup SourceDir; ship tray icon assets#18
Merged
Conversation
The installer build got past the MinVersion fix (#17) and then failed at Inno Setup compile: Error on line 66 in installer.iss: The system cannot find the path specified. Line 66 is SetupIconFile=scripts\assets\flowkey.ico. Every Source path in the script (dist\, vendor\, scripts\, SetupIconFile, LICENSE, README.md) is written relative to the repo root, but Inno Setup resolves relative paths against the .iss file's own directory by default — which is installer\, not the root. (The build log confirms this: OutputDir=out resolved to installer\out.) So the icon read failed first, and the [Files] sources would have failed next. Fix: set SourceDir=.. so all Source paths resolve against the repo root. This also lands OutputDir at <root>\out — exactly where build.ps1 and release-installer.yml look for the .exe (previously a latent mismatch). Also ship scripts\assets\* (the .ico the tray loads at runtime via A_ScriptDir "\assets\flowkey.ico") — [Files] copied scripts\grammarFix.ahk, lib, and ui but not assets, so the installed app would silently have no tray icon. Added matching [UninstallDelete] cleanup. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
With SourceDir fixed, the compile reached the [Code] section and failed:
Error on line 284 in installer.iss: Column 29: 'BEGIN' expected.
Inno Setup Pascal { } comments do NOT nest, so the {app} constant inside the
CurUninstallStepChanged doc-comment closed the comment at its '}', and the
trailing "are removed but BEFORE..." text was parsed as code. Reword the
comment to avoid a brace constant (the other {app}/{localappdata} refs in
[Code] are inside single-quoted ExpandConstant strings, which are safe).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The previous fix replaced {app} but my replacement text contained a literal
"{ }" — whose '}' closed the brace comment early all over again (error just
moved to line 287). Reworded with zero brace characters in the comment body.
Verified: every brace remaining in [Code] is either a matched comment
delimiter with no inner braces, or a constant inside a single-quoted string.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Document the three installer.iss fixes (MinVersion comment, SourceDir, [Code] brace comment) + the shipped tray-icon assets — the build workflow's first green run produced Flowkey-Setup-1.6.0.exe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third installer-build fix. After #15 (AHK download) and #17 (MinVersion comment),
the build reached Inno Setup compile and failed:
Line 66 is
SetupIconFile=scripts\assets\flowkey.ico. All Source paths arewritten relative to the repo root, but Inno resolves relative paths against the
.issdirectory (installer\) by default — the build log showsOutputDir=outresolving toinstaller\out.SourceDir=..→ all Source paths resolve against the repo root, andOutputDir lands at
<root>\out(where build.ps1 / CI look for the exe).scripts\assets\*(the tray.ico; was not in [Files]) + uninstall cleanup.Verifying by a
workflow_dispatchbuild on this branch before merge.